package cm.zhentao.controller;

import cm.zhentao.pojo.dto.LoginDto;
import cm.zhentao.service.UserService;

import cm.zhentao.entity.Result;
import org.springframework.web.bind.annotation.*;

import javax.annotation.Resource;

@RestController
@RequestMapping("/user")
public class UserController {
    @Resource
    private UserService userService;

    /**
     * 登录
     * @param loginDto
     * @return
     */
    @PostMapping("/login")
    public Result login(@RequestBody LoginDto loginDto){
        return userService.login(loginDto);
    }
}